#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "threadserialport.h"
#include "pageserialportparemeters.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT


public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void InitLayout();
    void ConnectSignalSlot();

    void SaveData(QString msg);

private:
    Ui::MainWindow *ui;

    ThreadSerialPort *mThreadSerialPort = nullptr;
    PageSerialPortParemeters *mPageSerialPortParemeters = nullptr;

    bool isSerialPortConnected = false;

    quint32 mFrameCnt = 0x00;

signals:
    void signalDisconnectSerialPort(void);
};
#endif // MAINWINDOW_H
